const { Service } = require('egg');
const fs = require('fs');

class UploadService extends Service {
    async handleUploadFile(src, dst) {
        if (fs.existsSync(src)) {
            fs.renameSync(src, dst);
            return '文件上传成功'
        }
    }
}

module.exports = UploadService;